const arr = [1, 2, 3, 4, 5, 6, 7, 8, 9]
const group = [[], [], [], []]

function spilt(arr, gruop){
    for(let i=0; i<arr.length; i++) {
        const rn = Math.floor(Math.random() * gruop.length)
        if(gruop[rn].length <=((arr.length / gruop) +1)){
            console.log('a')
            gruop[rn].push(arr[i])
        }
    }
    return group
}

console.log(spilt(arr, group));
